// src/api/deepseekApi.js
import axios from 'axios';

const DEEPSEEK_API_URL = 'https://platform.deepseek.com/api_keys'; // 替换为实际的 DeepSeek API URL
const DEEPSEEK_API_KEY = 'sk-dd81b6f585ac416283e4a94fd19d28fe'; // 替换为你的 API Key

const deepseekApi = {
  // 示例：获取某个资源
  getResource: async (resourceId:any) => {
    try {
      const response = await axios.get(`${DEEPSEEK_API_URL}/resources/${resourceId}`, {
        headers: {
          Authorization: `Bearer ${DEEPSEEK_API_KEY}`,
        },
      });
      return response.data;
    } catch (error) {
      console.error('Error fetching resource:', error);
      throw error;
    }
  },

  // 示例：创建某个资源
  createResource: async (resourceData:any) => {
    try {
      const response = await axios.post(`${DEEPSEEK_API_URL}/resources`, resourceData, {
        headers: {
          Authorization: `Bearer ${DEEPSEEK_API_KEY}`,
        },
      });
      return response.data;
    } catch (error) {
      console.error('Error creating resource:', error);
      throw error;
    }
  },

  // 其他 API 调用...
};

export default deepseekApi;
